const path = require('path')
// eslint-disable-next-line space-before-function-paren
function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = {
  publicPath: './',
  configureWebpack: {
    resolve: {
      alias: {
        '@': resolve('src'),
        component: resolve('src/components'),
        styles: resolve('src/assets/styles'),
        images: resolve('src/assets/images')
      }
    }
  },
  devServer: {
    port: 8089,
    open: false,
    proxy: {
      '/api': {
        target: process.env.VUE_APP_BASE_API,
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      }
    }
  }
}
